package heima3_2.cn.osc.constant;

import net.oschina.app.R;

import heima3_2.cn.osc.ui.main_fragment.DynamicFragment.DynamicMainFragment;
import heima3_2.cn.osc.ui.main_fragment.MeFragment;
import heima3_2.cn.osc.ui.main_fragment.SyntherMainFragment;
import heima3_2.cn.osc.ui.main_fragment.findFragment;

/**
 * Created by ThinkPad on 2016/10/30.
 * 通过枚举的方式快速创建底部标签
 */


public enum MainTab {

    NEWS(0, "new",R.string.main_tab_name_news, R.drawable.tab_icon_new,
            SyntherMainFragment.class),

    TWEET(1, "tweet",R.string.main_tab_name_tweet, R.drawable.tab_icon_tweet,
            DynamicMainFragment.class),

    QUICK(2, "quick",R.string.main_tab_name_quick, R.drawable.tab_icon_new,
            null),

    EXPLORE(3, "explore",R.string.main_tab_name_explore, R.drawable.tab_icon_explore,
            findFragment.class),

    ME(4, "me",R.string.main_tab_name_my, R.drawable.tab_icon_me,
            MeFragment.class);
    private int idx;
    private String tag;
    private int resName;//名称的资源id
    private int resIcon;//图标的资源id
    private Class<?> clz;

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    private MainTab(int idx, String tag, int resName, int resIcon, Class<?> clz) {
        this.idx = idx;
        this.tag = tag;
        this.resName = resName;
        this.resIcon = resIcon;
        this.clz = clz;
    }

    public int getIdx() {
        return idx;
    }

    public void setIdx(int idx) {
        this.idx = idx;
    }

    public int getResName() {
        return resName;
    }

    public void setResName(int resName) {
        this.resName = resName;
    }

    public int getResIcon() {
        return resIcon;
    }

    public void setResIcon(int resIcon) {
        this.resIcon = resIcon;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }
}
